/**
 */
package com.dingpeikeji.quickdeer.core.modules.payinfo.entity;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.dingpeikeji.quickdeer.core.common.persistence.DataEntity;
import com.dingpeikeji.quickdeer.core.modules.orders.entity.TOrders;

/**
 * 支付信息Entity
 * @author wuh
 * @version 2016-07-12
 */
public class TPayinfo extends DataEntity<TPayinfo> {
	
	private static final long serialVersionUID = 1L;
	
	// 结算状态的取值
	public static final String SETTLE_STATUS_YES = "2"; // 已结算
	public static final String SETTLE_STATUS_NO = "1"; // 未结算
	
	private Integer discountid;		// 主键
	private TOrders orders;		// 订单ID
	private String discounttype;		// 优惠方式
	private Double payfee;		// 支付金额
	private String flowno;		// 支付流水号
	private String sellerno;		// 商户号
	private String buyerno;		// 买家账号
	private String settlestatus; // 1为未结算，2为已结算
	
	// 日期范围查询条件
	private String createDateStart;
	private String createDateEnd;
	
	public TPayinfo() {
		super();
	}

	public TPayinfo(String id){
		super(id);
	}

	@NotNull(message="主键不能为空")
	public Integer getDiscountid() {
		return discountid;
	}

	public void setDiscountid(Integer discountid) {
		this.discountid = discountid;
	}
	
	public TOrders getOrders() {
		return orders;
	}

	public void setOrders(TOrders orders) {
		this.orders = orders;
	}
	
	@Length(min=0, max=2, message="优惠方式长度必须介于 0 和 2 之间")
	public String getDiscounttype() {
		return discounttype;
	}

	public void setDiscounttype(String discounttype) {
		this.discounttype = discounttype;
	}
	
	public Double getPayfee() {
		return payfee;
	}

	public void setPayfee(Double payfee) {
		this.payfee = payfee;
	}
	
	@Length(min=0, max=64, message="支付流水号长度必须介于 0 和 64 之间")
	public String getFlowno() {
		return flowno;
	}

	public void setFlowno(String flowno) {
		this.flowno = flowno;
	}
	
	@Length(min=0, max=64, message="商户号长度必须介于 0 和 64 之间")
	public String getSellerno() {
		return sellerno;
	}

	public void setSellerno(String sellerno) {
		this.sellerno = sellerno;
	}
	
	@Length(min=0, max=64, message="买家账号长度必须介于 0 和 64 之间")
	public String getBuyerno() {
		return buyerno;
	}

	public void setBuyerno(String buyerno) {
		this.buyerno = buyerno;
	}

	public String getSettlestatus() {
		return settlestatus;
	}

	public void setSettlestatus(String settlestatus) {
		this.settlestatus = settlestatus;
	}

	public String getCreateDateStart() {
		return createDateStart;
	}

	public void setCreateDateStart(String createDateStart) {
		this.createDateStart = createDateStart;
	}

	public String getCreateDateEnd() {
		return createDateEnd;
	}

	public void setCreateDateEnd(String createDateEnd) {
		this.createDateEnd = createDateEnd;
	}
	
}
